function Position(x, y) {
    this.x = x | 0;
    this.y = y | 0;
}

Position.prototype.add = function (pos) {
    this.x += pos.x;
    this.y += pos.y;
};